package com.goktech.olala.core.service.impl;

import com.goktech.olala.core.service.ICustomerConsigneeService;
import com.goktech.olala.server.dao.customer.CustomerConsigneeMapper;
import com.goktech.olala.server.pojo.customer.CustomerConsignee;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Classname ICustomerConsigneeServiceImp
 * @Description TODO
 * @Date 2020/12/24 13:23
 * @Created by ASUS
 */
@Service
public class ICustomerConsigneeServiceImp implements ICustomerConsigneeService {

    @Autowired
    CustomerConsigneeMapper customerConsigneeMapper;

    @Override
    public int deleteByPrimaryKey(Integer customerAddrId) {
        int i = customerConsigneeMapper.deleteByPrimaryKey(customerAddrId);
        return i;
    }

    @Override
    public int insert(CustomerConsignee record) {
        int insert = customerConsigneeMapper.insert(record);
        return insert;
    }

    @Override
    public CustomerConsignee selectByPrimaryKey(Integer customerAddrId) {
        CustomerConsignee customerConsignee = customerConsigneeMapper.selectByPrimaryKey(customerAddrId);
        return customerConsignee;
    }

    @Override
    public List<CustomerConsignee> selectAll() {
        List<CustomerConsignee> customerConsigneeList = customerConsigneeMapper.selectAll();
        return customerConsigneeList;
    }

    @Override
    public int updateByPrimaryKey(CustomerConsignee record) {
        int i = customerConsigneeMapper.updateByPrimaryKey(record);
        return i;
    }

    @Override
    public List<CustomerConsignee> selectByCustomerId(String customerId) {
        List<CustomerConsignee> customerConsigneeList = customerConsigneeMapper.selectByCustomerId(customerId);
        return customerConsigneeList;
    }
}
